From ecc13fb5a51ee436bb0712c7c9eeb004bbc6c971 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 8 Sep 2001 04:39:53 +0000 Subject: [PATCH] remove CellRendererTextPixbuf 2001-09-08 Havoc Pennington * gtk/gtk-docs.sgml: remove CellRendererTextPixbuf * gtk/resources.sgml: add section on mailing lists, bugzilla, etc. * gtk/tmpl/gtkaccelgroup.sgml: add long description * gtk/gtk-sections.txt: reorder accel group section; probably need to delete most of it * gtk/tmpl/gtkmain.sgml: Clean it up a little bit * gtk/gtk-docs.sgml: rearrange the list of "core/misc" sections so that useful things are near the top and stupid junk is near the bottom. * gtk/tmpl/gtkfeatures.sgml: fix/finish this section * gtk/gtk-docs.sgml: create a separate section for overview/tutorial material and special notes, and put the reference docs for the "misc non-widget" stuff into its own section. * gtk/compiling.sgml: write this section * gtk/gtk-docs.sgml: The intro section weirdly had two paragraphs that said the same thing. Delete one of them. --- ChangeLog | 4 + ChangeLog.pre-2-0 | 4 + ChangeLog.pre-2-10 | 4 + ChangeLog.pre-2-2 | 4 + ChangeLog.pre-2-4 | 4 + ChangeLog.pre-2-6 | 4 + ChangeLog.pre-2-8 | 4 + docs/reference/ChangeLog | 29 ++++ docs/reference/gtk/compiling.sgml | 32 ++++- docs/reference/gtk/gtk-docs.sgml | 92 ++++++++---- docs/reference/gtk/gtk-sections.txt | 29 +--- docs/reference/gtk/resources.sgml | 127 ++++++++++++++++ docs/reference/gtk/tmpl/gtk-unused.sgml | 52 +++++++ docs/reference/gtk/tmpl/gtkaccelgroup.sgml | 136 +++++++++--------- .../gtk/tmpl/gtkcellrenderertextpixbuf.sgml | 15 -- docs/reference/gtk/tmpl/gtkfeatures.sgml | 77 +++++++--- docs/reference/gtk/tmpl/gtkmain.sgml | 71 ++++++--- docs/reference/gtk/tmpl/gtkmenu.sgml | 6 +- .../reference/gtk/tmpl/gtktreeviewcolumn.sgml | 14 +- docs/reference/gtk/tmpl/gtkwindow.sgml | 20 --- gtk/gtkmain.c | 16 +++ 21 files changed, 541 insertions(+), 203 deletions(-) create mode 100644 docs/reference/gtk/resources.sgml diff --git a/ChangeLog b/ChangeLog index ae23ef5393..9ea547858d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index ae23ef5393..9ea547858d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ae23ef5393..9ea547858d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ae23ef5393..9ea547858d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ae23ef5393..9ea547858d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ae23ef5393..9ea547858d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ae23ef5393..9ea547858d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +2001-09-07 Havoc Pennington + + * gtk/gtkmain.c: move some docs inline + 2001-09-07 Havoc Pennington * gtk/gtk.h: tsk tsk, jrb broke the build diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 15bd8ca20a..49cfdd3ff3 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,32 @@ +2001-09-08 Havoc Pennington + + * gtk/gtk-docs.sgml: remove CellRendererTextPixbuf + + * gtk/resources.sgml: add section on mailing lists, bugzilla, etc. + + * gtk/tmpl/gtkaccelgroup.sgml: add long description + + * gtk/gtk-sections.txt: reorder accel group section; probably need + to delete most of it + + * gtk/tmpl/gtkmain.sgml: Clean it up a little bit + + * gtk/gtk-docs.sgml: rearrange the list of "core/misc" sections so + that useful things are near the top and stupid junk is near the + bottom. + + * gtk/tmpl/gtkfeatures.sgml: fix/finish this section + + * gtk/gtk-docs.sgml: create a separate section for + overview/tutorial material and special notes, and put the + reference docs for the "misc non-widget" stuff into its own + section. + + * gtk/compiling.sgml: write this section + + * gtk/gtk-docs.sgml: The intro section weirdly had two paragraphs + that said the same thing. Delete one of them. + Tue Sep 4 01:33:51 2001 Owen Taylor * gtk/gtk-docs.sgml: Remove references to a couple diff --git a/docs/reference/gtk/compiling.sgml b/docs/reference/gtk/compiling.sgml index 1ac5acca13..445b7e0ef0 100644 --- a/docs/reference/gtk/compiling.sgml +++ b/docs/reference/gtk/compiling.sgml @@ -13,10 +13,40 @@ How to compile your GTK+ application -Compiling GTK+ Applications +Compiling GTK+ Applications on UNIX +To compile a GTK+ application, you need to tell the compiler where to +find the GTK+ header files and libraries. This is done with the +pkg-config utility. + + +The following interactive shell session demonstrates how +pkg-config is used: + +$ pkg-config --cflags gtk+-2.0 + -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/atk-1.0 +$ pkg-config --libs gtk+-2.0 + -L/usr/lib -L/usr/X11R6/lib -lgtk-x11-1.3 -lgdk-x11-1.3 -lXi -lgdk_pixbuf-1.3 -lm -lpangox -lpangoxft -lXft -lXrender -lXext -lX11 -lfreetype -lpango -latk -lgobject-1.3 -lgmodule-1.3 -ldl -lglib-1.3 + + + +The simplest way to compile a program is to use the "backticks" +feature of the shell. If you enclose a command in backticks +(not single quotes), then its output will be +substituted into the command line before execution. So to compile +a GTK+ Hello, World, you would type the following: + +$ cc `pkg-config --cflags --libs gtk+-2.0` hello.c -o hello + + + +To compile a GTK+ program for the framebuffer, use the +"gtk+-linux-fb-2.0" package name instead of "gtk+-2.0": + +$ cc `pkg-config --cflags --libs gtk+-linux-fb-2.0` hello.c -o hello + diff --git a/docs/reference/gtk/gtk-docs.sgml b/docs/reference/gtk/gtk-docs.sgml index 056432077f..ae454c7e54 100644 --- a/docs/reference/gtk/gtk-docs.sgml +++ b/docs/reference/gtk/gtk-docs.sgml @@ -102,7 +102,6 @@ - @@ -138,6 +137,7 @@ + ]> @@ -147,18 +147,10 @@ - GTK+ + GTK+ Overview -GTK+ is a multi-platform open source GUI Toolkit. Everything about -GTK+ from the object-oriented design to the Free Software LGPL -licensing allows you to code your project with the most freedom -possible. You can develop open software, free software, or even -commercial non-free software without having to spend a dime for -licenses or royalties. - - -GTK+ is a set of libraries to create graphical user interfaces. It -works on many Unix-like platforms, Windows, and on framebuffer +GTK+ is a library for creating graphical user interfaces. It +works on many UNIX-like platforms, Windows, and on framebuffer devices. GTK+ is released under the GNU Library General Public License (GNU LGPL), which allows for flexible licensing of client applications. GTK+ has a C-based object-oriented architecture that @@ -167,52 +159,101 @@ been written, including C++, Objective-C, Guile/Scheme, Perl, Python, TOM, Ada95, Free Pascal, and Eiffel. -GTK+ consists of the following component libraries: +GTK+ depends on the following libraries: GLib -Provides many useful data types, macros, type conversions, -string utilities and a lexical scanner. Includes Win32 support. +A general-purpose utility library, not specific to graphical user interfaces. +GLib provides many useful data types, macros, type conversions, +string utilities, file utilities, a main loop abstraction, and so on. + + + + +Pango + + +Pango is a library for internationalized text handling. It centers +around the #PangoLayout object, representing a paragraph of text. +Pango provides the engine for #GtkTextView, #GtkLabel, #GtkEntry, and +other widgets that display text. + + + + + +ATK + + +ATK is the Accessibility Toolkit. It provides a set of generic +interfaces allowing accessibility technologies to interact with a +graphical user interface. For example, a screen reader uses ATK to +discover the text in an interface and read it to blind users. GTK+ +widgets have built-in support for accessibility using the ATK +framework. + + + + + +GdkPixbuf + +This is a small library which allows you to create #GdkPixbuf +("pixel buffer") objects from image data or image files. +Use a #GdkPixbuf in combination with #GtkImage to display images. GDK -A wrapper for low-level windowing functions. +GDK is the abstraction layer that allows GTK+ to support multiple +windowing systems. GDK provides drawing and window system facilities +on X11, Windows, and the Linux framebuffer device. GTK+ -An advanced widget set. + +The GTK+ library itself contains widgets, +that is, GUI components such as #GtkButton or #GtkTextView. + >k-Compiling; + >k-Resources; >k-Windows; >k-Framebuffer; + + + + + + GTK+ Core Reference + >k-General; - >k-Feature-Test-Macros; - >k-Graphics-Contexts; - >k-Styles; - - >k-Resource-Files; >k-Keyboard-Accelerators; - >k-Selections; >k-Clipboards; >k-Drag-and-Drop; - >k-Signals; >k-Stock-Items; >k-Themeable-Stock-Images; - >k-Types; + >k-Resource-Files; >k-Bindings; >k-Standard-Enumerations; + >k-Graphics-Contexts; + >k-Styles; + >k-Selections; + >k-Feature-Test-Macros; + >k-Signals; + >k-Types; + @@ -281,7 +322,6 @@ An advanced widget set. >k-GtkCellRenderer; >k-GtkCellRendererPixbuf; >k-GtkCellRendererText; - >k-GtkCellRendererTextPixbuf; >k-GtkCellRendererToggle; >k-GtkListStore; diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 2ae6bc7fc1..433cf79494 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -2736,20 +2736,6 @@ GTK_CELL_RENDERER_TEXT_CLASS GTK_IS_CELL_RENDERER_TEXT_CLASS -
-gtkcellrenderertextpixbuf -GtkCellRendererTextPixbuf -GtkCellRendererTextPixbuf -gtk_cell_renderer_text_pixbuf_new - -GTK_CELL_RENDERER_TEXT_PIXBUF -GTK_IS_CELL_RENDERER_TEXT_PIXBUF -GTK_TYPE_CELL_RENDERER_TEXT_PIXBUF -gtk_cell_renderer_text_pixbuf_get_type -GTK_CELL_RENDERER_TEXT_PIXBUF_CLASS -GTK_IS_CELL_RENDERER_TEXT_PIXBUF_CLASS -
-
gtkcellrenderertoggle GtkCellRendererToggle @@ -3393,17 +3379,21 @@ GTK_RC_STYLE_GET_CLASS gtkaccelgroup Keyboard Accelerators GtkAccelGroup -GtkAccelEntry gtk_accel_group_new gtk_accel_group_get_default gtk_accel_group_ref gtk_accel_group_unref gtk_accel_group_activate gtk_accel_groups_activate -gtk_accel_group_attach -gtk_accel_group_detach gtk_accel_group_lock gtk_accel_group_unlock +gtk_accelerator_valid +gtk_accelerator_parse +gtk_accelerator_name +gtk_accelerator_set_default_mod_mask +gtk_accelerator_get_default_mod_mask +gtk_accel_group_attach +gtk_accel_group_detach gtk_accel_group_get_entry gtk_accel_group_lock_entry gtk_accel_group_unlock_entry @@ -3415,11 +3405,6 @@ gtk_accel_group_create_add gtk_accel_group_create_remove gtk_accel_groups_from_object gtk_accel_group_entries_from_object -gtk_accelerator_valid -gtk_accelerator_parse -gtk_accelerator_name -gtk_accelerator_set_default_mod_mask -gtk_accelerator_get_default_mod_mask
diff --git a/docs/reference/gtk/resources.sgml b/docs/reference/gtk/resources.sgml new file mode 100644 index 0000000000..5a6410c1f7 --- /dev/null +++ b/docs/reference/gtk/resources.sgml @@ -0,0 +1,127 @@ + + +Mailing lists and bug reports +3 +Mailing lists and bug reports + + + +Mailing lists and bug reports + +Getting help with GTK+ + + + + +Filing a bug report or feature request + + +If you encounter a bug, misfeature, or missing feature in GTK+, please +file a bug report on http://bugzilla.gnome.org. We'd also appreciate +reports of incomplete or misleading information in the GTK+ +documentation; file those against the "docs" component of the "gtk+" +product in Bugzilla. + + + +Don't hesitate to file a bug report, even if you think we may know +about it already, or aren't sure of the details. Just give us as much +information as you have, and if it's already fixed or has already been +discussed, we'll add a note to that effect in the report. + + + +The bug tracker should definitely be used for feature requests, it's +not only for bugs. We track all GTK+ development in bugzilla, so it's +the way to be sure the GTK+ developers won't forget about an issue. + + + + + +Submitting Patches + + +If you develop a bugfix or enhancement for GTK+, please file that in +Bugzilla as well. Bugzilla allows you to attach files; please attach a +patch generated by the "diff" utility, using the "-u" option to make +the patch more readable. All patches must be offered under the terms +of the GNU LGPL license, so be sure you are authorized to give us the +patch under those terms. + + + +If you want to discuss your patch before or after developing it, mail +gtk-devel-list@gnome.org. But be sure to file the Bugzilla report as +well; if the patch is only on the list and not in Bugzilla, it's +likely to slip through the cracks. + + + + + +Mailing lists + + +There are several mailing lists dedicated to GTK+ and related +libraries. Discussion of GLib, Pango, and ATK in addition to GTK+ +proper is welcome on these lists. You can subscribe or view the +archives of these lists on http://mail.gnome.org. + + + + + + +gtk-list@gnome.org + +gtk-list covers general GTK+ topics; questions about using GTK+ in programs, +GTK+ from a user standpoint, announcements of GTK+-related projects +such as themes or GTK+ modules would all be on-topic. The bulk of the +traffic consists of GTK+ programming questions. + + + + +gtk-app-devel-list@gnome.org +gtk-app-devel-list covers writing applications in GTK+. It's narrower +in scope than gtk-list, but the two lists overlap quite a +bit. gtk-app-devel-list is a good place to ask questions about GTK+ +programming. + + + +gtk-devel-list@gnome.org + +gtk-devel-list is for discussion of work on GTK+ itself, it is NOT for +asking questions about how to use GTK+ in applications. gtk-devel-list +is appropriate for discussion of patches, bugs, proposed features, +and so on. + + + + +gtk-i18n-list@gnome.org + +gtk-i18n-list is for discussion of internationalization in GTK+; +Pango is the main focus of the list. Questions about the details of +using Pango, and discussion of proposed Pango patches or features, are +all on topic. + + + + +gtk-doc-list@gnome.org + +gtk-doc-list is for discussion of the gtk-doc documentation system +(used to document GTK+), and for work on the GTK+ documentation. + + + + + + + + + + diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index 9f4b6f81c5..2e7482a10d 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -393,6 +393,18 @@ Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_FOREIGN @b: @Returns: + + +This is a private struct used by GTK+ internally, don't worry about it. + + +@accel_group: +@accelerator_key: +@accelerator_mods: +@accel_flags: +@object: +@signal_id: + The widget whose accelerators are to be shown by the #GtkAccelLabel. @@ -440,6 +452,13 @@ Define a function pointer. Deprecated. @arg: @arg_id: + + + + + +@parent: + @@ -1277,6 +1296,13 @@ Sets the default size of child buttons. @accel_group: @Returns: + + + + + +@Returns: + Initializes a previously allocated #GtkCList widget for use. This should not @@ -2193,6 +2219,15 @@ a gtk_object_unref(). @tree_model: @iter: + + + + + +@tree_column: +@width: +@size: + Given a GtkTypeClass pointer @klass, and a GtkType @cast_type, make @@ -2363,6 +2398,14 @@ fundamental type. @window: @Returns: + + + + + +@window: +@Returns: + @@ -2379,3 +2422,12 @@ fundamental type. @window: @functions: + + + + + +@window: +@setting: +@resizeable: + diff --git a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml index 40c4189c16..bb6a7da733 100644 --- a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml +++ b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml @@ -3,35 +3,39 @@ Keyboard Accelerators +global keyboard accelerators (for an entire #GtkWindow) +A #GtkAccelGroup represents a group of keyboard accelerators, attached +to a toplevel #GtkWindow (with gtk_window_add_accel_group()). Usually +you won't need to create a #GtkAccelGroup directly; instead, when +using #GtkItemFactory, GTK+ automatically sets up the accelerators for +your menus. + + +Note that accelerators are different from +mnemonics. Accelerators are shortcuts for +activating a menu item; they appear alongside the menu item they're a +shortcut for, for example "Ctrl+Q" might appear alongside the "Quit" +menu item. Mnemonics are shortcuts for GUI elements such as text +entries or buttons; they appear as underlined characters. See +gtk_label_new_with_mnemonic(). Menu items can have both accelerators +and mnemonics, of course. - +gtk_label_new_with_mnemonic(), gtk_window_add_accel_group() - +On opaque data type representing a group of accelerators. - - - - - -@accel_group: -@accelerator_key: -@accelerator_mods: -@accel_flags: -@object: -@signal_id: - @@ -87,38 +91,84 @@ Keyboard Accelerators @Returns: - + @accel_group: -@object: - + @accel_group: -@object: - + + + + + +@keyval: +@modifiers: +@Returns: + + + + + + + +@accelerator: +@accelerator_key: +@accelerator_mods: + + + + + + + +@accelerator_key: +@accelerator_mods: +@Returns: + + + + + + + +@default_mod_mask: + + + + + + + +@Returns: + + + @accel_group: +@object: - + @accel_group: +@object: @@ -240,49 +290,3 @@ Keyboard Accelerators @Returns: - - - - - -@keyval: -@modifiers: -@Returns: - - - - - - - -@accelerator: -@accelerator_key: -@accelerator_mods: - - - - - - - -@accelerator_key: -@accelerator_mods: -@Returns: - - - - - - - -@default_mod_mask: - - - - - - - -@Returns: - - diff --git a/docs/reference/gtk/tmpl/gtkcellrenderertextpixbuf.sgml b/docs/reference/gtk/tmpl/gtkcellrenderertextpixbuf.sgml index 1b6cf94862..7350e49a15 100644 --- a/docs/reference/gtk/tmpl/gtkcellrenderertextpixbuf.sgml +++ b/docs/reference/gtk/tmpl/gtkcellrenderertextpixbuf.sgml @@ -14,18 +14,3 @@ GtkCellRendererTextPixbuf - - - - - -@parent: - - - - - - -@Returns: - - diff --git a/docs/reference/gtk/tmpl/gtkfeatures.sgml b/docs/reference/gtk/tmpl/gtkfeatures.sgml index 4243833b9c..218a76b2fd 100644 --- a/docs/reference/gtk/tmpl/gtkfeatures.sgml +++ b/docs/reference/gtk/tmpl/gtkfeatures.sgml @@ -6,9 +6,9 @@ variables and functions to check the GTK+ version. -This section describes the variables and functions available to test the -version of the GTK+ library in use. -FIXME: probably merge with other general stuff. +GTK+ provides version information, primarily useful in configure checks +for builds that have a configure script. Applications will not +typically use the features described here. @@ -18,8 +18,15 @@ FIXME: probably merge with other general stuff. -The major version number of the GTK+ library. -(e.g. in GTK+ version 1.2.5 this is 1.) +The major version number of the GTK+ library. (e.g. in GTK+ version +1.2.5 this is 1.) + + + +This variable is in the library, so represents the +GTK+ library you have linked against. Contrast with the +#GTK_MAJOR_VERSION macro, which represents the major version of the +GTK+ headers you have included. @@ -29,6 +36,13 @@ The minor version number of the GTK+ library. (e.g. in GTK+ version 1.2.5 this is 2.) + +This variable is in the library, so represents the +GTK+ library you have linked against. Contrast with the +#GTK_MINOR_VERSION macro, which represents the minor version of the +GTK+ headers you have included. + + @@ -37,72 +51,99 @@ The micro version number of the GTK+ library. - +This variable is in the library, so represents the GTK+ library you +have linked against. Contrast with the #GTK_MICRO_VERSION macro, which +represents the micro version of the GTK+ headers you have included. + + + + +This is the binary age passed to libtool. If "libtool" means nothing +to you, don't worry about it. ;-) - +This is the interface age passed to libtool. If "libtool" means nothing +to you, don't worry about it. ;-) -Checks that the GTK+ library in use is compatable with the given version. +Checks that the GTK+ library in use is equal to the given +version. Primarily useful to compare the header file version +(from #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION) +the the runtime library version. This should only be done +in the build for your application, to check that the user's libraries +and header files are the same. Applications should not do this +when deployed, because it's OK for applications to use a different +micro version of GTK+ than the one they were compiled against. @required_major: the required major version. @required_minor: the required major version. @required_micro: the required major version. -@Returns: NULL if the GTK+ library is compatable with the given version, or +@Returns: NULL if the GTK+ library is compatible with the given version, or a string describing the version mismatch. - +Like #gtk_major_version, but from the headers used at +application compile time, rather than from the library linked against +at application run time. - +Like #gtk_minor_version, but from the headers used at +application compile time, rather than from the library linked against +at application run time. - +Like #gtk_micro_version, but from the headers used at +application compile time, rather than from the library linked against +at application run time. - +Like #gtk_binary_age, but from the headers used at +application compile time, rather than from the library linked against +at application run time. - +Like #gtk_interface_age, but from the headers used at +application compile time, rather than from the library linked against +at application run time. - +Returns %TRUE if the version of the GTK+ header files is the same +as the passed-in version. -@major: -@minor: -@micro: +@major: major version (first number in 1.2.5) +@minor: minor version (second number in 1.2.5) +@micro: micro version (third number in 1.2.5) diff --git a/docs/reference/gtk/tmpl/gtkmain.sgml b/docs/reference/gtk/tmpl/gtkmain.sgml index 1c7a5e215f..13fed95017 100644 --- a/docs/reference/gtk/tmpl/gtkmain.sgml +++ b/docs/reference/gtk/tmpl/gtkmain.sgml @@ -1,17 +1,47 @@ -General +Main loop and Events -Mainloop and event handling +Library initialization, main event loop, and events + + +Before using GTK+, you need to initialize it; initialization connects +to the window system display, and parses some standard command line +arguments. The gtk_init() function initializes GTK+. gtk_init() exits +the application if errors occur; to avoid this, use gtk_init_check(). +gtk_init_check() allows you to recover from a failed GTK+ +initialization - you might start up your application in text mode instead. + + -GTK uses an event oriented programming model. While conventional C programs -have control over the program flow all the time this does not apply to -applications written using GTK. Instead you set up some objects and -register some functions (callbacks) to be called whenever -some event occurs and give control to the GTK mainloop (e.g. by calling -gtk_main). +If your application supports internationalization, gtk_set_locale() +should be called prior to gtk_init(). + + + +Like all GUI toolkits, GTK+ uses an event-driven programming +model. When the user is doing nothing, GTK+ sits in the +main loop and waits for input. If the user +performs some action - say, a mouse click - then the main loop "wakes +up" and delivers an event to GTK+. GTK+ forwards the event to one or +more widgets. + + + +When widgets receive an event, they frequently emit one or more +signals. Signals notify your program that +"something interesting happened" by invoking functions you've +connected to the signal with g_signal_connect(). Functions connected +to a signal are often termed callbacks. + + + +When your callbacks are invoked, you would typically take some action +- for example, when an Open button is clicked you might display a +#GtkFileSelectionDialog. After a callback finishes, GTK+ will return +to the main loop and await more user input. @@ -33,34 +63,35 @@ main (int argc, char **argv) ... /* Show the application window */ - gtk_widget_showall (mainwin); + gtk_widget_show_all (mainwin); - /* Let the user interact with our application */ + /* Enter the main event loop, and wait for user interaction */ gtk_main (); /* The user lost interest */ - gtk_exit (0); + return 0; } - +It's OK to use the GLib main loop directly instead of gtk_main(), +though it involves slightly more typing. See #GMainLoop in the GLib +documentation. - + -Sets the current locale according to the program environment. This is the -same as calling the libc function setlocale(LC_ALL, "") but also takes -care of the locale specific setup of the windowing system used by GDK. +See the GLib manual, especially #GMainLoop and signal-related +functions such as g_signal_connect(). - -You should call this function before gtk_init to -support internationalization of your GTK+ applications. + + + -@Returns: A string corresponding to the locale set. +@Returns: diff --git a/docs/reference/gtk/tmpl/gtkmenu.sgml b/docs/reference/gtk/tmpl/gtkmenu.sgml index 29e75e743a..9d4e531e7a 100644 --- a/docs/reference/gtk/tmpl/gtkmenu.sgml +++ b/docs/reference/gtk/tmpl/gtkmenu.sgml @@ -96,9 +96,9 @@ Creates a new #GtkMenu. Adds a new #GtkMenuItem to the end of the menu's item list. - @menu: a #GtkMenu. @child: The #GtkMenuItem to add. + @m: @c: @@ -108,8 +108,8 @@ Adds a new #GtkMenuItem to the end of the menu's item list. Adds a new #GtkMenuItem to the beginning of the menu's item list. - @menu_child: + @m: @c: @menu: a #GtkMenu. @@ -122,10 +122,10 @@ Adds a new #GtkMenuItem to the menu's item list at the position indicated by @position. - @menu: a #GtkMenu. @child: The #GtkMenuItem to add. @pos: + @position: The position in the item list where @child is added. Positions are numbered from 0 to n-1. diff --git a/docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml b/docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml index 435f5d971a..9a2b55651f 100644 --- a/docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml +++ b/docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml @@ -36,11 +36,11 @@ GtkTreeViewColumn @xalign: @property_changed_signal: @spacing: +@fixed_width: @width: @requested_width: @min_width: @max_width: -@displayed_width: @drag_x: @drag_y: @title: @@ -62,6 +62,7 @@ GtkTreeViewColumn +@GTK_TREE_VIEW_COLUMN_GROW_ONLY: @GTK_TREE_VIEW_COLUMN_RESIZABLE: @GTK_TREE_VIEW_COLUMN_AUTOSIZE: @GTK_TREE_VIEW_COLUMN_FIXED: @@ -160,17 +161,6 @@ GtkTreeViewColumn @Returns: - - - - - -@tree_column: -@width: - -@size: - - diff --git a/docs/reference/gtk/tmpl/gtkwindow.sgml b/docs/reference/gtk/tmpl/gtkwindow.sgml index 6e38db29a0..b601a6e9bd 100644 --- a/docs/reference/gtk/tmpl/gtkwindow.sgml +++ b/docs/reference/gtk/tmpl/gtkwindow.sgml @@ -128,26 +128,6 @@ the child gets a larger allocation than it requests. it's larger - - - - - -@window: -@setting: - -@resizeable: - - - - - - - -@window: -@Returns: - - diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 8a24f8f279..f23031eef5 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -580,6 +580,22 @@ gtk_exit (gint errorcode) gdk_exit (errorcode); } + +/** + * gtk_set_locale: + * + * + * Initializes internationalization support for GTK+. You + * should call this function before gtk_init() if your application + * supports internationalization. + * + * (In gory detail - sets the current locale according to the + * program environment. This is the same as calling the libc function + * setlocale (LC_ALL, "") but also takes care of the locale specific + * setup of the windowing system used by GDK.) + * + * Return value: a string corresponding to the locale set, as with the C library function setlocale() + **/ gchar* gtk_set_locale (void) { -- 2.30.2